Add cpacs format checker - #1421
Draft
svengoldberg wants to merge 14 commits into
Draft
Conversation
The failing wing W14_ChaDih has tip sections translated by exactly (0, 1, 1) and (0, 2, 2) — a perfect 45° dihedral. CTiglWingHelper::GetMajorDirection() picks the span axis by comparing accumulated |Y| vs |Z| with a plain >=, and for this wing those sums are mathematically equal, so the winner is decided by last-ULP rounding — which differs on arm64 (FMA contraction, Apple libm). The CI numbers prove it: 43.152389734005403 + 46.847610265994597 = 90.0 exactly — after SetSweep nudged the tip, the tie flipped the major axis and the dihedral was measured as its complement. Fix: a relative-tolerance tie-break (GreaterOrTied, 1e-8) in GetMajorDirection/GetDeepDirection (src/wing/CTiglWingHelper.cpp) so near-ties resolve deterministically to the conventional axis on every platform. 2. BSplineInterpolation.withKinksShield — over-strict test, fixed. ArraysMatch defaults to exact ==, but the 0.5 parameter is derived arithmetic (tigl::Interpolate rescaling between kink params), which lands 1 ULP off on arm64. The test now uses InTolerance(1e-14). 3. SIGABRT in makeLoft.nacelleInverted — narrowed, needs one more CI run. Three things the log tells us: (a) guideCurvePatches.nacelleInverted — same .brep inputs through MakePatches::Perform directly — passes on macOS, so the crash lives in the CTiglMakeLoft wrapper path (tolerance 1e-6 vs 1e-7, plus ConcatenateWire and CloseShape). That's why the MakePatches null-guard in your last commit couldn't fix it. (b) gtest catches C++ exceptions on POSIX, so a thrown CTiglError/Standard_Failure would show as a test failure, not an abort. (c) No libc++abi/assert message reached stderr — this is a silent abort (terminate-in-noexcept, heap check, or a direct abort()), which can't be pinpointed by reading code. So I added a temporary step to .github/workflows/build-test.yml that, when the macOS test job fails, reruns makeLoft.* under lldb --batch with thread backtrace all on crash — the next CI run will hand you the exact crash site.
Currently, the schema check is only included in the CI test on the latest linux version in Debug mode. That should be sufficient to check.
Contributor
PR RemindersThis PR has changes in
This is an automated reminder from CI |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1421 +/- ##
==========================================
+ Coverage 73.19% 73.22% +0.02%
==========================================
Files 324 324
Lines 28606 28594 -12
==========================================
- Hits 20939 20938 -1
+ Misses 7667 7656 -11
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Do not merge until #1406 is merged
General information
The branch to merge is branched off conda-forge-migration and hence should be kept in sync with that one. Depends on #1406.
Since conda-forge-migration applies major changes to the
pixi.toml, it is most reasonable to already include these changes in this PR to avoid merge conflicts later.Description
This PR includes the external cpacs schema tool in the TiGL repo and our CI workflow. Hence, a wrong indented or written CPACS XSD in our repo would lead to a failed pipeline.
This could be of interested when we edit the XSD on our own and before the merge is done in CPACS.
How Has This Been Tested?
The pipeline ran on a dummy branch and failed when I provoked an error by wrong indenting of the XSD
Fixes #1420
Checklist for PR Author:
ChangeLog.mdupdated